React 部署上 Github pages


Posted by Rich on 2021-09-29

官網教學
我以為我會了,過了幾個禮拜後又忘了要怎麼部署。

  1. 先載個 npm install --save gh-pages
  2. 並在 package.json scripts 下面加這兩行
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build",
    
  3. package.json 還要加上
    "homepage": "https://myusername.github.io/reponame",
  4. 最後 npm run deploy
  5. 去 github setting pages 換成 source gh-pages
  6. 點網址應該就可以看到頁面了









Related Posts

一起讀 Knowledge-Enabled Robotic Agents for Shelf Replenishment in Cluttered Retail Environments

一起讀 Knowledge-Enabled Robotic Agents for Shelf Replenishment in Cluttered Retail Environments

[TensorFlow Certification Day5] Convolutional Neural Networks in TensorFlow Week1/2/3 (5hrs)

[TensorFlow Certification Day5] Convolutional Neural Networks in TensorFlow Week1/2/3 (5hrs)

ecto 簡介 (1) – cell 與 plasm

ecto 簡介 (1) – cell 與 plasm


Comments